# 分阶段 构建 五子棋-2
FROM node:14.21.3-alpine3.17 AS gomoku_2

WORKDIR /app

COPY gomoku-react /app

RUN yarn config set registry https://registry.npmmirror.com  && \
    yarn  && \
    yarn build

# 最终构建
FROM nginx:1.28.0-alpine3.21-slim

COPY nginx.conf /etc/nginx/nginx.conf

RUN mkdir -p /app
COPY HTML5-Gomoku /app/五子棋-1
COPY --from=gomoku_2 /app/build /app/五子棋-2


EXPOSE 5122 5123

# docker build -t firfe/gomoku_zh-cn:2025.06.28 .

